﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VM.Common.EntityEnum;
 

namespace VM.Entity.EntityDto
{
    ///<summary>
    ///用户
    ///</summary>
    public class UserDto
    {
        public int Id { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        public string? UserName { get; set; }

        /// <summary>
        /// 年龄
        /// </summary>
        public int Age { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        public int SexType { get; set; }

        /// <summary>
        /// 性别的描述
        /// </summary>
        public string SexTypeDescription
        {
            get
            {
                if (SexType == (int)SexTypeEnum.Male)
                {
                    return "男性";
                }
                else
                {
                    return "女性";
                }
            }
        }

        /// <summary>
        /// 身份证号码
        /// </summary>
        public string? IdNumber { get; set; }

        /// <summary>
        /// 现居住地
        /// </summary>
        public string? CurrentAddress { get; set; }

        /// <summary>
        /// 家庭住址
        /// </summary>
        public string? HomeAddress { get; set; }

        /// <summary>
        /// 入职时间
        /// </summary>
        public DateTime? EntryTime { get; set; }

        /// <summary>
        /// 离职时间
        /// </summary> 
        public DateTime? DepartTime { get; set; }

        /// <summary>
        /// 在职状态
        /// </summary>
        public int JobStatus { get; set; }

        /// <summary>
        /// 在职状态文字描述
        /// </summary>
        public string JobStatusDescription
        {
            get
            {

                return EnumManager.GetJobStatusRemark(JobStatus);

                //if (JobStatus == (int)JobStatusEnum.OnJob)
                //{
                //    return "在职";
                //}
                //else if (JobStatus == (int)JobStatusEnum.Depart)
                //{
                //    return "离职";
                //}
                //else
                //{
                //    return "停薪留职";
                //}
            }
        }

        public JwtAuthResDto AuthInfo { get; set; }
    }
}
